package com.hdsx.restful.ygzt.kyzd.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hdsx.ao.base.BaseOpearte;
import com.hdsx.restful.ygzt.kyzd.bean.Kyzd;
import com.hdsx.restful.ygzt.kyzd.mapper.KyzdMapper;
import com.hdsx.restful.ygzt.kyzd.service.KyzdServer;
/**
 * kyzdServer实现类
 *
 */
@Service
public class KyzdServerImpl extends BaseOpearte<Kyzd> implements KyzdServer {

	public KyzdServerImpl() {
		super("GIS_KYZD");
	}

	@Resource(name="kyzdMapper")
	private KyzdMapper mapper;

	@Override
	public int queryCount(String xzqhbm, String kyzmc, String lxdh,String zj) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("xzqhbm", xzqhbm);
		parameter.put("name", kyzmc);
		parameter.put("lxdh", lxdh);
		parameter.put("zj", zj);
		return mapper.queryCount(parameter);
	}

	@Override
	public List<Kyzd> queryList(String xzqhbm, String kyzmc, String lxdh,String zj, int begin, int end) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("xzqhbm", xzqhbm);
		parameter.put("name", kyzmc);
		parameter.put("lxdh", lxdh);
		parameter.put("zj", zj);
		parameter.put("begin", begin);
		parameter.put("end", end);
		List<Kyzd> lists=mapper.queryList(parameter);
		return lists;
	}

	@Override
	public Kyzd queryById(String id) {
		return mapper.selectById(id);
	}
	
	@Override
	public List<String> selectName(String name){
		return mapper.selectName(name);
	}
}
